﻿using Basic.HrRemoteModel.TreeDic;
using Basic.HrRemoteModel.TreeDic.Model;
using WeDonekRpc.Client.Attr;

namespace Basic.FlowExtendService.lmpl
{
    [ClassLifetimeAttr(ClassLifetimeType.SingleInstance)]
    internal class ThreeDicService : IThreeDicService
    {
        public string[] GetName ( long dicId, string[] vals )
        {
            return new GetTreeNames
            {
                DicId = dicId,
                Values = vals
            }.Send();
        }
        public string GetName ( long dicId, string val )
        {
            return new GetTreeName
            {
                DicId = dicId,
                Value = val
            }.Send();
        }

        public Dictionary<string, string> GetNames ( long dicId, string[] vals )
        {
            return new GetTreeNameDic
            {
                DicId = dicId,
                Values = vals
            }.Send();
        }

        public TreeItemName[] GetNames ( Dictionary<long, string[]> dic )
        {
            return new BatchGetTreeName
            {
                Param = dic
            }.Send();
        }
    }
}
